#ifndef SYSCLK_H
#define SYSCLK_H

#include "soc/rtc.h"
#include "soc/rtc_cntl_reg.h"
#include "deviceinfodef.h"
#include "time.h"

typedef struct
{
    uint8_t year;
    uint8_t mon;
    uint8_t day;
    uint8_t date;
    uint8_t hour;
    uint8_t min;
    uint8_t sec;
}time_type;
extern time_type rtc;

void clock_init(void);
void esp32_settime(time_type *time);
void esp32_gettime(time_type *time);

#endif

